<?php 
	include "../../lib/connection.php";
	$action=$_GET['action'];
	if($action=="edit"){
		$id=$_GET['id'];
		$fname= $_GET['txtfname'];
		$lname=$_GET['txtlname'];
		$email=$_GET['email'];
		$name= $_GET['txtuser'];
		$pass= $_GET['txtpass'];
		$sql="UPDATE users SET first_name=?,last_name=?,email=?,user_name=?,password=? WHERE user_id=?";
		$stmt=sqlsrv_query($con,$sql,array($fname,$lname,$email,$name,$pass,$id));
		sqlsrv_query($con,$sql,array($fname,$lname,$email,$name,$pass,$id));
		sqlsrv_free_stmt($stmt);
		sqlsrv_close($con);
		header("location:../index.php");	
	}
	
?>